package org.spring.springboot.app.user.sysuser.dao;

import org.apache.ibatis.annotations.Param;
import org.spring.springboot.app.base.Menu;
import org.spring.springboot.app.user.sysuser.domain.bo.SysUserBO;
import org.spring.springboot.app.user.sysuser.domain.po.SysUserPO;
import org.spring.springboot.app.user.sysuser.domain.po.SysUserRolePO;
import org.spring.springboot.app.user.sysuser.domain.po.SysUserWalletPO;
import org.spring.springboot.app.user.sysuser.domain.vo.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SysUserDao {
    int deleteByPrimaryKey(String id);

    int insert(SysUserPO record);

    int insertSelective(SysUserPO record);

    SysUserPO selectByPrimaryKey(String id);

    List<SysUserPO> selectAll(UserSearchVo vo,@Param("pageNum") int pageNum,
                              @Param("pageSize") int pageSize);

    int updateByPrimaryKeySelective(SysUserPO record);

    int updateByPrimaryKey(SysUserPO record);

    SysUserBO findByLoginId(String loginId);

    List<UserRoleQueryVO> queryUserRoles(String id);

    int insertUserRole(SysUserRolePO p);

    int deleteUserRoleByUserId(String id);

    int getCountLoginName(SysUserPO po);

    List<Menu> selectUserMenus(String id);

    int getUserTargetCount(@Param("vo") UserCheckVo vo);

    SysUserWalletPO queryWallet(String id);

    int updateWallet(SysUserWalletPO wallet);

    int delUserAgentRoleType(String userId);
}